package likou;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * @Info:
 * @Author: 唐小尊
 * @Date: 2020/10/14 08:09
 */
public class _1002 {
    public static void main(String[] args) {
//        String ww = "1234567890";
//        int now = 0;
//        System.out.println(ww.indexOf('1'));
//        System.out.println(ww.indexOf('1',1));
//        HashMap<Object, Object> objectObjectHashMap = new HashMap<>();
//        objectObjectHashMap.getOrDefault(1,1);
//        List<String> daan = new ArrayList<>();
//        String[] www = daan.toArray(new String[daan.size()]);
        System.out.println(String.valueOf('a'+1));
    }
    public List<String> commonChars(String[] A) {
        int[] minfreq = new int[26];
        Arrays.fill(minfreq, Integer.MAX_VALUE);
        for (String word: A) {
            int[] freq = new int[26];
            int length = word.length();
            for (int i = 0; i < length; ++i) {
                char ch = word.charAt(i);
                ++freq[ch - 'a'];
            }
            for (int i = 0; i < 26; ++i) {
                minfreq[i] = Math.min(minfreq[i], freq[i]);
            }
        }

        List<String> ans = new ArrayList<String>();
        for (int i = 0; i < 26; ++i) {
            for (int j = 0; j < minfreq[i]; ++j) {
                ans.add(String.valueOf((char) (i + 'a')));
            }
        }
        return ans;
    }
}
